package com.ms.tank.abstractfactory;

import com.ms.tank.enums.Dir;
import com.ms.tank.enums.Group;
import com.ms.tank.game.Bullet;
import com.ms.tank.game.Explode;
import com.ms.tank.game.Tank;
import com.ms.tank.game.TankFrame;

/**
 * @Date 2021/3/18 18:17:24
 * @Author mashuai
 */
public class DefaultFactory extends GameFactory {
    @Override
    public BaseTank createTank(int x, int y, Dir dir, Group group, TankFrame tankFrame) {
        return new Tank(x, y, dir, group, tankFrame);
    }

    @Override
    public BaseBullet createBullet(int x, int y, Dir dir, Group group, TankFrame tankFrame) {
        return new Bullet(x, y, dir, group, tankFrame);
    }

    @Override
    public BaseExplode createExplode(int x, int y, TankFrame tankFrame) {
        return new Explode(x, y, tankFrame);
    }
}
